From: Joost Verdoorn Date: Fri, 13 Apr 2012 17:05:51 +0000 (+0200) Subject: telepathyClient: call this.updated() when a new message is added to a notification X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6665 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d79e8b84c9d74b75902c474e1cfc32a117f984ac;p=gnome-shell.git telepathyClient: call this.updated() when a new message is added to a notification When receiving another message or responding in a new expanded chat notification that has no prior chat history, the notification moved down below the edge of the screen instead of expanding up, making part of it invisible. Avoid this by making sure the notification's position is updated. https://bugzilla.gnome.org/show_bug.cgi?id=661944 --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 502b9f30a..fab17403d 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -577,7 +577,7 @@ const Notification = new Lang.Class({ if (params.body) this.addBody(params.body, params.bodyMarkup); - this._updated(); + this.updated(); }, setIconVisible: function(visible) { @@ -616,7 +616,7 @@ const Notification = new Lang.Class({ } this._contentArea.add(actor, style ? style : {}); - this._updated(); + this.updated(); }, // addBody: @@ -679,7 +679,7 @@ const Notification = new Lang.Class({ this._table.add_style_class_name('multi-line-notification'); this._table.add(this._actionArea, props); this._updateLastColumnSettings(); - this._updated(); + this.updated(); }, _updateLastColumnSettings: function() { @@ -760,7 +760,7 @@ const Notification = new Lang.Class({ this._buttonFocusManager.add_group(this._buttonBox); button.connect('clicked', Lang.bind(this, this._onActionInvoked, id)); - this._updated(); + this.updated(); }, setUrgency: function(urgency) { @@ -856,7 +856,7 @@ const Notification = new Lang.Class({ if (this._canExpandContent()) { this._addBannerBody(); this._table.add_style_class_name('multi-line-notification'); - this._updated(); + this.updated(); } return false; })); @@ -867,7 +867,7 @@ const Notification = new Lang.Class({ (!this._titleFitsInBannerMode && !this._table.has_style_class_name('multi-line-notification')); }, - _updated: function() { + updated: function() { if (this.expanded) this.expand(false); }, diff --git a/js/ui/telepathyClient.js b/js/ui/telepathyClient.js index e110c606c..b705c7ad5 100644 --- a/js/ui/telepathyClient.js +++ b/js/ui/telepathyClient.js @@ -853,6 +853,8 @@ const ChatNotification = new Lang.Class({ this._lastGroupActor.add(body, props.childProps); + this.updated(); + let timestamp = props.timestamp; this._history.unshift({ actor: body, time: timestamp, realMessage: group != 'meta' });